// app.js
App({
  onLaunch() {
    const logs = wx.getStorageSync('logs') || []
    logs.unshift(Date.now())
    wx.setStorageSync('logs', logs)
    wx.clearStorageSync()
    // 登录
    wx.login({
      success: res => {
      }
    })
  },
  methods: {
    changeFinishCount: function() {
      wx.request({
        url: 'http://81.70.199.174:8081/change',
        method: 'POST',
        header: {
          'Authorization': this.globalData.token
        },
        success: (res) => {
          if(res.data.code === 200) {
            this.globalData.finish =res.data.data;
            console.log(this.globalData.finish);
          }
        }
      })
    }
  },
  globalData:{
    finish:0,
    userInfo:{
      username: "",
      password: "",
      email:"",
    },
    token:"",
    username1:"",
    favorites:[],
    currentWord:null,
    curwords:[],
    words:[{e:'yangxiaolin',c:'小丽',s:'.n'},{e:'kansihan',c:'砍三',s:'.n'},{e:'dinghaile',c:'海螺',s:'.n'},{e:'wangenyi',c:'NE',s:'.n'},{e:'hello',c:'你好',s:'.v'},{e:'qiaoyuqi',c:'美女q',s:'.n'},{e:'lijingyi',c:'美女l',s:'.n'},{e:'lifanghao',c:'立方好',s:'.n'},{e:'lixing',c:'帅哥理性',s:'.n'},{e:'yuhaiyang',c:'鱼海洋',s:'.n'},{e:'wuzongjin',c:'Zone紧',s:'.n'},{e:'leixuan',c:'学委',s:'.n'},{e:'huangsiqi',c:'美女h',s:'.n'},{e:'sunyingting',c:'美女s',s:'.n'},{e:'tangjinxuan',c:'美女t',s:'.n'},{e:'yumiyang',c:'玉米样',s:'.n'},{e:'one',c:'一',s:'.n'},{e:'two',c:'二',s:'.n'},{e:'three',c:'三',s:'.n'},{e:'four',c:'四',s:'.n'},{e:'five',c:'五',s:'.n'},{e:'six',c:'六',s:'.n'},{e:'seven',c:'七',s:'.n'},{e:'eight',c:'八',s:'.n'},{e:'nine',c:'九',s:'.n'},{e:'ten',c:'十',s:'.n'},{e:'world',c:'世界',s:'.n'},{e:'shit',c:'玛德',s:'.n'},{e:'fuck',c:'可恶',s:'.v'},{e:'666这个入有轨',c:'无法翻译...',s:'.n'}]
  }
})
